<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('nav', TEMPLATE_INCLUDEPATH)) : (include template('nav', TEMPLATE_INCLUDEPATH));?>
<?php  if($op == 'list') { ?>
<div class="panel panel-default">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
			<input type="hidden" name="m" value="meepo_xianchang" />
			<input type="hidden" name="do" value="qd_manage" />
            
            <input type="hidden" name="id" value="<?php  echo $id;?>" />
           
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">粉丝昵称</label>
				<div class="col-xs-12 col-sm-8 col-lg-8">
					<input class="form-control" name="nickname" id="" type="text" value="<?php  echo $_GPC['nickname'];?>" placeholder="请输入粉丝昵称">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
				<div class="col-sm-8 col-lg-9 col-xs-12">
					<input class="btn btn-primary" id="" type="submit" value="搜索">
				</div>
			</div>
		</form>
	</div>
</div>
<form action="" method="post" class="form-horizontal" role="form" ng-controller="formCtrl" id="form2">
	<div class="panel panel-default">
		<div class="panel-heading">
			签到记录
		</div>
		<div class="panel-body table-responsive">
			<table class="table table-hover" style="display:auto;">
				<thead class="navbar-inner">
					<tr >
					   <th style="width:5em;text-align:center" >选？</th>
					   <th style="width:10em;text-align:center">粉丝信息</th>
					   <th style="width:10em;text-align:center">签到状态</th>
					   <th style="width:20em;text-align:center">签到时间</th>
                       <th style="width:15em;text-align:center">操作</th>
					</tr>
				</thead>
				<tbody>
					<?php  if(is_array($qds)) { foreach($qds as $key => $item) { ?>
					<tr>
						<td><input type="checkbox" name="select[]" value="<?php  echo $item['id']?>"></td>
						
					  	<td class="row-hover" style="text-align:center">
								<img width="50" src="<?php  echo $item['avatar'];?>" class="avatar" />
								<div class="mainContent">
									<div class="nickname" style="text-align:center"><?php  echo $item['nick_name'];?></div>
								</div>
					    </td>
						<td class="row-hover" style="text-align:center">
							<?php  if($item['level']==1) { ?>签到成功<?php  } else { ?>待审核<?php  } ?>
					    </td>
						<td class="row-hover" style="text-align:center">
								<?php  echo  date('Y-m-d H:i:s',$item['createtime'])?>
					    </td>
						<td style="text-align:center">
						<?php  if($level==2) { ?>
							<a class="btn btn-success" href="<?php  echo $this->createWebUrl('qd_manage',array('op'=>'post','id'=>$id,'qd_id'=>$item['id']))?>"
								ng-mouseenter="tooltip()" data-toggle="tooltip" data-placement="top" title="审核">审核
								<i class="fa fa-times"></i>
							</a>
						<?php  } ?>
							<a class="btn btn-danger" href="<?php  echo $this->createWebUrl('qd_manage',array('op'=>'del','id'=>$id,'qd_id'=>$item['id']))?>"
								ng-mouseenter="tooltip()" data-toggle="tooltip" data-placement="top" title="删除">删除
								<i class="fa fa-times"></i>
							</a>

						</td>
					</tr>
					<?php  } } ?>
				</tbody>
				<tr>
					<td><input type="checkbox" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});"></td>
                    <td colspan="12">
					<?php  if($level==2) { ?>
					   <input type="submit" class="btn btn-success" name="signs" value="审核签到" />
					<?php  } ?>
                        <input type="submit" class="btn btn-danger" name="delete" value="删除选定" />
						<input type="submit" class="btn btn-pramary" name="down" value="导出选定数据" />
                        <input type="submit" class="btn btn-pramary" name="downall" value="导出所有数据" />
						<input type="hidden" name="token" value="<?php  echo $_W['token'];?>">
                    </td>
				</tr>
			</table>

		</div>
	</div>
</form>
<?php  echo $pager;?>
<script>
	require(['angular', 'jquery', 'util'], function(angular, $, util){

		var app = angular.module('app', []);
		app.controller('formCtrl', function($scope,$http){
			$scope.tooltip = function(){
		      $('[data-toggle="tooltip"]').tooltip();
		    }
		});
		angular.bootstrap(document, ['app']);
	});
</script>
<?php  } ?>

<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>
